package cn.xej.callback;

import org.springframework.amqp.rabbit.connection.CorrelationData;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

/**
 * @Author alicat.xu
 * @Date 2021/10/20 2:58 下午
 * 消息发送到交换机时的回调
 */
@Component
public class RabbitConfirmCallback implements RabbitTemplate.ConfirmCallback {



    @Override
    public void confirm(CorrelationData correlationData, boolean b, String s) {
        System.out.println("RabbitConfirmCallback.....数据.. "+correlationData);
        System.out.println("RabbitConfirmCallback.....确认情况.. "+b);
        System.out.println("RabbitConfirmCallback.....原因.. "+s);

    }
}
